package com.wuhunyu.controller;

import com.wuhunyu.commonutils.result.CommonResult;
import com.wuhunyu.service.MsmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 短信服务控制器层
 *
 * @author wuhunyu
 * @version 1.0
 * @date 2021-01-22 21:07
 */
@RestController
@RequestMapping("/msm")
//@CrossOrigin
public class MsmController {

    @Autowired
    private MsmService msmService;

    @PostMapping("/sendPhone")
    public CommonResult sendPhone(String phone) {
        return msmService.sendPhone(phone);
    }

    @PostMapping("/sendEmail")
    public CommonResult sendEmail(@RequestBody String email) {
        return msmService.sendEmail(email);
    }

}
